package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

public class Menu {

    private PrintStream printStream;
    private BufferedReader reader;
    private Collection<String> menuOptions;

    public Menu(PrintStream printstream, BufferedReader reader, Collection<String> menuOptions) {
        this.printStream = printstream;
        this.reader = reader;
        this.menuOptions = menuOptions;
    }

    public String promptUserInput() throws IOException {
        for(String option : menuOptions){
            printStream.println(option);
        }
        return reader.readLine();
    }

}
